package com.heima.media.controller;

import com.heima.media.service.WmChannelService;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.pojos.pojos.WmChannel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author mgw
 * @create 2021/9/29 12:16
 */
@RestController
@RequestMapping("/api/v1/wmChannel")
public class WmChannelController {
    @Autowired
    public WmChannelService wmChannelService;
    @GetMapping("/all")
    public ResponseResult<WmChannel> findChannel(){
       List<WmChannel> wmChannels= wmChannelService.findChannel();
       return ResponseResult.okResult(wmChannels);
    }
}
